package com.pfsoft.mybatisplusgradle.service.impl;

import com.pfsoft.mybatisplusgradle.domain.TbOrderInfo;
import com.pfsoft.mybatisplusgradle.example.TbOrderInfoExample;
import com.pfsoft.mybatisplusgradle.mapper.TbOrderInfoMapper;
import com.pfsoft.mybatisplusgradle.service.IOrderInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author pengfei
 * @date 2022年06月28日 11:21
 */
@Service
public class OrderInfoServiceImpl implements IOrderInfoService {

    @Autowired
    private TbOrderInfoMapper tbOrderInfoMapper;

    @Override
    public int save(TbOrderInfo tbOrderInfo) {
        return tbOrderInfoMapper.insertSelective(tbOrderInfo);
    }

    @Override
    public List<TbOrderInfo> getAll() {
       return tbOrderInfoMapper.selectByExample(new TbOrderInfoExample());
    }
}
